package com.company;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/22 18:54
 */
public class Main42 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        String s = sc.nextLine();
        String[] strings = s.split(" ");
        for (int i = 0; i < strings.length; i++) {
            list.add(Integer.valueOf(strings[i]));
        }
        if (list.size() == 0 || list.size() == 1) {
            System.out.println(-1);
            return;
        }

        int maxValue = list.get(0);
        int secondMaxValue = 0;
        List<Integer> res = new ArrayList<>();
        for (int i = 1; i < list.size(); i++) {
            Integer cur = list.get(i);
            if (cur < maxValue && cur >= secondMaxValue) {
                res.add(i);
            }
            if (cur > maxValue) {
                secondMaxValue = maxValue;
                maxValue = cur;
            } else if (cur > secondMaxValue) {
                secondMaxValue = cur;
            }
        }
        if (res.size() == 0 ) {
            System.out.println(-1);
            return;
        }
        for (int i = 0; i < res.size(); i++) {
            if (i == res.size() - 1) System.out.print(res.get(i));
            else System.out.print(res.get(i) + " ");
        }
    }
}
